<style scoped>
  .page{
    position: fixed;
    top:0;
    left:0;
    width: 100%;
    height: 100%;
    background-color: white;
    z-index: 9999;
  }
  .page-hide{
    animation-name:pageHide;
    animation-duration:0.5s;
    animation-fill-mode:forwards;
  }
  @keyframes pageHide {
    from {
      opacity:1;
    }
    to {
      opacity: 0;
      display: none;
      z-index: -1;
    }
  }
</style>

<template>
  <div class="page" :class="{'page-hide':!state}">
    <div class='base'>
      <div class='cube'></div>
      <div class='cube'></div>
      <div class='cube'></div>
      <div class='cube'></div>
      <div class='cube'></div>
      <div class='cube'></div>
      <div class='cube'></div>
      <div class='cube'></div>
      <div class='cube'></div>
    </div>
  </div>
</template>

<script type="text/javascript">
  export default {
    name:'page',
    props:['state'],
    watch:{
      state(val){

      }
    }
  }
</script>
